﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">


    <LinearGradientBrush x:Key="DefaultBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#E2EAF3" Offset="0" />
        <GradientStop Color="#C3CEDC" Offset="0.45" />
        <GradientStop Color="#A2B1C4" Offset="0.45" />
        <GradientStop Color="#B4C3DB" Offset="1" />
    </LinearGradientBrush>

    <!-- MINIMIZE -->
    <Border x:Key="WindowButtonMinimizeIcon" 
            Width="12" 
            Height="5" 
            Margin="0,5,0,0" 
            BorderBrush="#535666" 
            BorderThickness="1" 
            Background="#FFFFFF" />
    <!-- MINIMIZE (disabled) -->
    <Border x:Key="WindowButtonMinimizeIconDisabled" Width="12" Height="5" Margin="0,5,0,0" 
          BorderBrush="#9FA5B2" BorderThickness="1" Background="#FFFFFF" />
    <!-- RESTORE -->
    <Canvas x:Key="WindowButtonRestoreIcon">
        <Rectangle Stroke="#535666" Fill="White" Width="10" Height="10" Canvas.Top="1" Canvas.Left="7" />
        <Rectangle Stroke="#535666" Fill="White" Width="4" Height="4" Canvas.Top="4" Canvas.Left="10" />
        <Rectangle Stroke="#535666" Fill="White" Width="10" Height="10" Canvas.Top="3" Canvas.Left="5" />
        <Rectangle Stroke="#535666" Fill="White" Width="4" Height="4" Canvas.Top="6" Canvas.Left="8" />
    </Canvas>
    <!-- RESTORE (disabled) -->
    <Canvas x:Key="WindowButtonRestoreIconDisabled">
        <Rectangle Stroke="#9FA5B2" Fill="White" Width="10" Height="10" Canvas.Top="1" Canvas.Left="7" />
        <Rectangle Stroke="#9FA5B2" Fill="White" Width="4" Height="4" Canvas.Top="4" Canvas.Left="10" />
        <Rectangle Stroke="#9FA5B2" Fill="White" Width="10" Height="10" Canvas.Top="3" Canvas.Left="5" />
        <Rectangle Stroke="#9FA5B2" Fill="White" Width="4" Height="4" Canvas.Top="6" Canvas.Left="8" />
    </Canvas>
    <!-- MAXIMIZE -->
    <ControlTemplate x:Key="WindowButtonMaximizeTemplate" TargetType="{x:Type Button}">
        <Border BorderBrush="Red" Background="{StaticResource DefaultBackgroundBrush}">
            <Border x:Name="Border1"
                BorderBrush="#535666" 
                BorderThickness="1" 
                Width="12" 
                Height="10">
                <Border x:Name="Border2" BorderBrush="#FCFCFC" BorderThickness="2">
                    <Border x:Name="Border3" BorderBrush="#535666" BorderThickness="1" />
                </Border>
            </Border>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="Border1" Property="BorderBrush" Value="#9FA5B2" />
                <Setter TargetName="Border2" Property="BorderBrush" Value="#FCFCFC" />
                <Setter TargetName="Border3" Property="BorderBrush" Value="#9FA5B2" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <!-- MAXIMIZE (disabled) -->
    <!-- CLOSE -->
    <Image Source="../Images/buttonX.png" Width="13" Height="10" x:Key="WindowButtonCloseIcon" />

    <!-- Background colors for red button (e.g close button) -->
    <LinearGradientBrush x:Key="RedButtonBackground" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0" Color="#F89C8C" />
        <GradientStop Offset="0.45" Color="#D47F75" />
        <GradientStop Offset="0.45" Color="#C04C3C" />
        <GradientStop Offset="1" Color="#C98172" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RedButtonMouseOverBackground" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0" Color="#F89C8C" />
        <GradientStop Offset="0.45" Color="#E36A53" />
        <GradientStop Offset="0.45" Color="#C72B0E" />
        <GradientStop Offset="0.75" Color="#D44310" />
        <GradientStop Offset="1" Color="#F5E478" />
    </LinearGradientBrush>


    <Style x:Key="btnClose" TargetType="{x:Type Button}">
        <Setter Property="Height" Value="16"></Setter>
        <Setter Property="Width" Value="16"></Setter>
        <Setter Property="Template" Value="{StaticResource WindowButtonMaximizeTemplate}"/>
    </Style>
    <Style x:Key="btnReduce" TargetType="{x:Type Button}">
        <Setter Property="Height" Value="16" />
        <Setter Property="Width" Value="16" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border
                        x:Name="Border"
                        CornerRadius="1"
                        BorderThickness="1"
                        Background="Green"
                        BorderBrush="White">
                        <ContentPresenter Content="-" 
                                          HorizontalAlignment="Center" 
                                          VerticalAlignment="Center" 
                                          RecognizesAccessKey="True" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Border"  Property="Background" Value="{StaticResource DegradeDefaultSelected}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="Border"  Property="Background" Value="{StaticResource DegradeDefaultSelected}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="btnMax" TargetType="{x:Type Button}">
        <Setter Property="Height" Value="16" />
        <Setter Property="Width" Value="16" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border
                        x:Name="Border"
                        CornerRadius="1"
                        BorderThickness="1"
                        Background="Yellow"
                        BorderBrush="White">
                        <ContentPresenter Content="[]" 
                                          HorizontalAlignment="Center" 
                                          VerticalAlignment="Center" 
                                          RecognizesAccessKey="True" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Border"  Property="Background" Value="{StaticResource DegradeDefaultSelected}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="Border"  Property="Background" Value="{StaticResource DegradeDefaultSelected}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    
    
</ResourceDictionary>
